﻿// -------------------------------------------------------------------------
//    @FileName         :    IAction.h
//    @Author           :    gaoyi
//    @Date             :    24-8-1
//    @Email            :    445267987@qq.com
//    @Module           :    IAction
//
// -------------------------------------------------------------------------

#pragma once

#include "NFComm/NFCore/NFPlatform.h"

#include "proto_client2access.pb.h"
#include "proto_cs.pb.h"

struct TPos
{
	int32_t m_iX;
	int32_t m_iY;
	int32_t m_iZ;
};

const int MAX_SKILL_NUM = 100;

class GameApi;
class IAction
{
	friend GameApi;
public:
	IAction(GameApi* pGameAPI) { m_pGameAPI = pGameAPI; }

	virtual ~IAction()
	{
	}

	virtual int Exec();
	virtual int MakePacket() = 0;
	virtual int HandlePacket(proto_client2access::C2AMsgHead& oMsgHead, char* pData, int iDataLen, bool& bIsEnd);

	virtual int HandleCSPacket(int iCmd, proto_ff::Proto_CSRsp& oCSRsp, bool& bIsEnd) { return 0; }
protected:
	GameApi* m_pGameAPI;
};
